(function() {

    var client = {
        _generateEndpoint: (url) => {
            if (window.location.protocol == 'https:') {
                var protocol = 'wss://';
            } else {
                var protocol = 'ws://';
            }
            var endpoint = protocol+url;
            return endpoint;
        }
    }
    
    let connect = new WebSocket(endpoint);
    // TODO 开发中，前端通过websocket实现实时刷新

})();